﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace WebBarracoDoSom.Models
{
    public class EmprestimoInitializer : DropCreateDatabaseIfModelChanges<EmprestimoDBContext>
    {
        protected override void Seed(EmprestimoDBContext context)
        {
            var emprestimos = new List<Emprestimo> {  new Emprestimo { ID = 1, 
                                                            User_ID = -1, 
                                                            Intrum_ID = -1,
                                                            DataRealizacao = DateTime.Now, 
                                                            DataDevolucao = DateTime.Now, 
                                                            Valor = 0}};

            emprestimos.ForEach(e => context.Emprestimos.Add(e));
        }
    }
}
